<?php
namespace app\common\configs;

class SettingConf
{
    const WX_CHAT_APP_CONFIG = 'wxAppConfig';                     // 小程序配置
    const MAP_SETTING = 'MapSetting';                              // 腾讯地图
    // 短信相关  start
    const SMS_CONFIG = 'smsConfig';                                // 短信配置
    const SMS_PAY_TPL = 'smsPayTpl';                               // 订单支付成功
    const SMS_ALLOCATE_TPL = 'smsAllocateTpl';                               // 订单分配成功 - 用户
    const SMS_REFUND_TPL = 'smsRefundTpl';                               // 订单退款提醒
    const SMS_CANCEL_TPL = 'smsCancelTpl';                               // 订单取消
    const SMS_ACCEPT_TPL = 'smsAcceptTpl';                               // 司机接单提醒 - 司机
    const SMS_ORDER_REMIND_TPL = 'smsOrderRemindTpl';                               // 新订单提醒
    const SMS_REMIND_ACCEPT_TPL = 'remindAcceptTpl';                               // 司机接单提醒用户
    const SMS_FINISH_TPL = 'finishTpl';                               // 订单完成提醒
    const SMS_CODE_TPL = 'codeTpl';                               // 发送验证码提醒
    // 短信相关 end
    // 微信模板配置 start
    const WX_REGISTER_TPL = 'WxRegisterTpl';                               // 用户注册提醒
    const WX_PAY_TPL = 'WxPayTpl';                               // 订单支付提醒用户
    const WX_RECEIPT_TPL = 'WxReceiptTpl';                               //  订单被接，分配并通知司机
    const WX_REFUND_TPL = 'WxRefundTpl';                               // 订单退款
    const WX_NOT_PAY_TPL = 'WxNotPayTpl';                               // 订单未支付
    const WX_REVOKE_TPL = 'WxRevokeTpl';                               // 订单取消
    const WX_EXPIRE_TPL = 'WxExpireTpl';                               // 订单过期
    const WX_ORDER_REMIND_TPL = 'WxOrderRemindTpl';                               // 新订单提醒
    const WX_APPOINTMENT_EXPIRE_TPL = 'WxAppointmentExpireTpl';                               // 预约到期提醒
    // 微信模板配置 end
    const WITHDRAW_CONFIG = "withdrawConfig";  // 提现配置
    const WX_APP_SHARE = "wxAppShare"; // 分享配置
    const ABOUT_USE_CONF = "aboutUsConfig"; // 关于我们
    const CUSTOMER_SERVICE_CONFIG = "customerServiceConfig"; // 客服电话
    // 线路配置 START
    const CAR_REMARK = "carRemarks";
    const AIRPORT_REMARK = "airportRemarks";
    const BUSES_REMARK = "enterpriseRemarks";
    const VEHICLE_REMARK = "vehicleRemarks";
    // 线路配置 END
    const LOGIN_CONFIG = "loginConfig"; // 登录配置
    const TC_CONFIG = "tcConfig"; // 腾讯云配置

    static $smsConfigArr = [
        self::SMS_CONFIG => ["smsId" => null, "smsSecret" => null, "smsSign" => null], // 短信配置
        self::SMS_PAY_TPL => ["payTpl" => "", "payTplStatus" => 0],  // 订单支付成功
        self::SMS_ALLOCATE_TPL => ["allocateTpl" => "", "allocateTplStatus" => 0], // 订单分配成功 - 用户
        self::SMS_REFUND_TPL => ["refundTpl" => "", "refundTplStatus" => 0], // 订单退款提醒
        self::SMS_CANCEL_TPL => ["cancelTpl" => "", "cancelTplStatus" => 0], // 订单取消
        self::SMS_ACCEPT_TPL => ["acceptTpl" => "", "acceptTplStatus" => 0], // 司机接单提醒 - 司机
        self::SMS_ORDER_REMIND_TPL => ["remindTpl" => "", "remindTplStatus" => 0], // 新订单提醒
        self::SMS_REMIND_ACCEPT_TPL => ["remindAcceptTpl" => "", "remindAcceptTplStatus" => 0], // 司机接单提醒用户
        self::SMS_FINISH_TPL => ["finishTpl" => "", "finishTplStatus" => 0], // 订单完成提醒
        self::SMS_CODE_TPL => ["codeTpl" => ""], // 发送验证码提醒
    ];

    static $smsContent = [
        "payTplContent" => "尊敬的用户您好：您的编号为{1}的订单，已支付成功！订单金额{2}，订单类型{3}，出发日期{4}，上车点{5}，人数{6}。如有疑问，请联系客服，境内电话{7}，境外电话{8}。感谢您对我们的信任！",
        "allocateTplContent" => "尊敬的用户您好：您的编号为{1}的订单，已分配成功！请凭短信准时到达上车点{2}上车，车型{3}，车牌号{4}，司机电话：{5}，出发日期{6}，人数{7}，订单类型{8}。建议您提前到达上车点，以免耽误行程。如有疑问，请联系客服，境内电话{9}，境外电话{10}。感谢您对我们的信任！",
        "refundTplContent" => "尊敬的用户您好：您的编号为{1}的订单，已退款成功，退款金额{2}元，预计会在5个工作日内到账，具体时间受各银行、支付机构等相关因素的影响，请注意查收。谢谢！",
        "cancelTplContent" => "尊敬的用户您好：您的编号为{1}的订单，已取消，取消原因{2}，如有疑问，请联系客服，境内电话{3}，境外电话{4}。",
        "acceptTplContent" => "尊敬的用户您好：您的编号为{1}的订单，已分配成功！订单金额{2}，订单类型{3}，出发日期{4}，上车点{5}，人数{6}。建议您提前到达上车点，以免耽误接送。如有疑问，请联系客服，境内电话{7}，境外电话{8}。",
        "remindTplContent" => "尊敬的用户您好：您有一条新的订单待分配，请及时登陆后台分配订单！如有疑问，请联系相关负责人。",
        "remindAcceptTplContent" => "尊敬的用户您好：您的编号为{1}的订单，{2}。如有疑问，请联系客服，境内电话{3}，境外电话{4}。感谢您对我们的信任！",
        "finishTplContent" => '尊敬的用户您好：您的编号为{1}的订单，已完成接送。如有疑问，请联系客服，境内电话{2}，境外电话{3}。感谢您对我们的信任！',
        "codeTplContent" => '您的验证码是{1}',
    ]; // 短信模板内容

    static $wxTemplateArr = [
        self::WX_REGISTER_TPL => ["registerTpl" => "", "registerTplStatus" => 0],
        self::WX_PAY_TPL => ["payTpl" => "", "payTplStatus" => 0],
        self::WX_RECEIPT_TPL => ["receiptTpl" => "", "receiptTplStatus" => 0],
        self::WX_REFUND_TPL => ["refundTpl" => "", "refundTplStatus" => 0],
        self::WX_NOT_PAY_TPL => ["notPayTpl" => "", "notPayTplStatus" => 0],
        self::WX_REVOKE_TPL => ["revokeTpl" => "", "revokeTplStatus" => 0],
        self::WX_EXPIRE_TPL => ["expireTpl" => "", "expireTplStatus" => 0],
        self::WX_ORDER_REMIND_TPL => ["orderRemindTpl" => "", "orderRemindTplStatus" => 0],
        self::WX_APPOINTMENT_EXPIRE_TPL => ["appointmentExpireTpl" => "", "appointmentExpireTplStatus" => 0],
    ];

    static $baseConfigArr = [
        self::WX_CHAT_APP_CONFIG => [
            "appId" => null, "appSecret" => null, "payMch" => null, "paySecret" => null,
            "certPem" => null,  "keyPem" => null, "wxMiniUploadKey" => "", "serviceProviderTicket" => null
        ], // 小程序配置
        self::MAP_SETTING => ["TCMapKey" => 'FMRBZ-2REKF-5VJJM-NW664-LTAK6-SMBEI'], // 腾讯地图
        self::WITHDRAW_CONFIG => ["withdrawNum" => '1', "withdrawMaxStatus" => 0, "withdrawMax" => 10, "withdrawMinStatus" => 0, "withdrawMin" => '1'], // 提现配置
        self::CAR_REMARK => ["carRemarks" => "", "carAlias" => '专车接送线路'], // 备注
        self::AIRPORT_REMARK => ["airportRemarks" => "", "airportAlias" => '机场线路'], // 备注
        self::BUSES_REMARK => [
            "enterpriseRemarks" => "", "enterpriseAlias" => '巴士线路', "hotLineBanner" => '/attachment/default/hotline-1.jpg',
            "hotLineBannerUrl" => '/attachment/default/hotline-1.jpg', "hotLineRemark" => '热门线路', "sendSmsStatus" => 0
        ], // 备注
        self::VEHICLE_REMARK => [
            "vehicleRemarks" => "", "vehicleAlias" => ["", '包车线路'], "hotLineBanner" => '/attachment/default/hotline-1.jpg',
            "hotLineBannerUrl" => '/attachment/default/hotline-1.jpg', "hotLineRemark" => '热门线路'
        ], // 备注
        self::LOGIN_CONFIG => ["siteTitle" => '跨境租车', "seoTitle" => '跨境租车', "copyright" => '跨境租车'], // 登录配置
        self::TC_CONFIG => ["secretId" => null, "secretKey" => null, "bucket" => null, "region" => "ap-guangzhou"], // 腾讯云配置
        self::WX_APP_SHARE => ["backgroundPicture" => null], // 分享图
        self::ABOUT_USE_CONF => ["aboutUs" => "跨境租车"],
        self::CUSTOMER_SERVICE_CONFIG => ["territoryTel" => null, "abroadTel" => null], // 客服电话
    ];
    static $baseConfigMsg = [
        self::WX_CHAT_APP_CONFIG => [
            "appId" => "小程序appId", "appSecret" => "小程序密钥", "payMch" => "商户号", "paySecret" => "支付密钥", "certPem" => "证书cert",
            "keyPem" => '证书key', "wxMiniUploadKey" => "小程序上传密钥", "serviceProviderTicket" => "票据"
        ], // 小程序配置
        self::MAP_SETTING => ["TCMapKey" => "腾讯云地图KEY"], // 腾讯地图
        self::SMS_CONFIG => ["smsId" => "短信ID", "smsSecret" => "短信密钥", "smsSign" => "短信签名"], // 短信配置
    ];
    static $convertArr = ["backgroundPicture", 'hotLineBanner']; // 要转换图片地址的变量。加后缀Url为新变量
}
